package com.benshou.bsoa.controller.feikong;


import com.benshou.bsoa.common.dto.ResponseVo;
import com.benshou.bsoa.dto.feikong.req.CompanyInfo;
import com.benshou.bsoa.dto.feikong.req.ProjectInfo;
import com.benshou.bsoa.service.feikong.FeiKongService;
import jakarta.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/api/v1/feikong")
public class CostController {

    @Autowired
    private FeiKongService companyInfoService;

    /**
     * 法人公司相关API接口
     * @Param requestMap
     * 2025-04-27
     */
    @PostMapping("/addenterprise")
    public ResponseVo insertEnterprise(@RequestBody @Valid CompanyInfo companyInfo) {
        return ResponseVo.success(companyInfoService.syncCompanyCommon(companyInfo)) ;
    }

    /**
     * 项目相关API接口
     * @Param requestMap
     * 2025-04-27
     */
    @PostMapping("/addproject")
    public ResponseVo insertProject(@RequestBody @Valid ProjectInfo projectInfo) {
        return ResponseVo.success(companyInfoService.syncProjectCommon(projectInfo)) ;
    }
}
